import {
  Button,
  message,
  Modal,
  Row,
  Col,
  Layout,
  Select,
  Input,
  Dropdown,
  Avatar,
  Menu,
  Popover,
  Form,
  Divider,
} from "ant-design-vue";

const comps = [
  Button,
  Modal,
  Row,
  Col,
  Layout,
  Select,
  Input,
  Dropdown,
  Avatar,
  Menu,
  Popover,
  Form,
  Divider,
];

const install = (_Vue) => {
  if (!_Vue) {
    return false;
  }

  comps.forEach((el) => {
    _Vue.use(el);
  });

  message.config({
    top: `200px`,
    duration: 2,
    maxCount: 3,
  });

  _Vue.prototype.$confirm = Modal.confirm;
  _Vue.prototype.$message = message;
};

export default install;
